<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC API Reference: erpc::FramedTransport Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC API Reference
   &#160;<span id="projectnumber">Rev. 1.7.2</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classerpc_1_1_framed_transport.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classerpc_1_1_framed_transport-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">erpc::FramedTransport Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__infra.html">Infrastructure</a> &raquo; <a class="el" href="group__infra__transport.html">Transports</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for framed transport layers.  
 <a href="classerpc_1_1_framed_transport.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="erpc__framed__transport_8h_source.html">erpc_framed_transport.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for erpc::FramedTransport:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classerpc_1_1_framed_transport__inherit__graph.svg" width="544" height="342"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for erpc::FramedTransport:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classerpc_1_1_framed_transport__coll__graph.svg" width="363" height="142"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:structerpc_1_1_framed_transport_1_1_header"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#structerpc_1_1_framed_transport_1_1_header">Header</a></td></tr>
<tr class="memdesc:structerpc_1_1_framed_transport_1_1_header"><td class="mdescLeft">&#160;</td><td class="mdescRight">Contents of the header that prefixes each message.  <a href="classerpc_1_1_framed_transport.html#structerpc_1_1_framed_transport_1_1_header">More...</a><br /></td></tr>
<tr class="separator:structerpc_1_1_framed_transport_1_1_header"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5cfed6f7b88aae9d017b4a1053acebc3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5cfed6f7b88aae9d017b4a1053acebc3"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#a5cfed6f7b88aae9d017b4a1053acebc3">FramedTransport</a> (void)</td></tr>
<tr class="memdesc:a5cfed6f7b88aae9d017b4a1053acebc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a5cfed6f7b88aae9d017b4a1053acebc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05359d9edebfc10848c15179d977699a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05359d9edebfc10848c15179d977699a"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#a05359d9edebfc10848c15179d977699a">~FramedTransport</a> (void)</td></tr>
<tr class="memdesc:a05359d9edebfc10848c15179d977699a"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classerpc_1_1_codec.html" title="Abstract serialization encoder/decoder interface. ">Codec</a> destructor. <br /></td></tr>
<tr class="separator:a05359d9edebfc10848c15179d977699a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a206f88e12844d6650c1611eefbec2fe3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#a206f88e12844d6650c1611eefbec2fe3">receive</a> (<a class="el" href="classerpc_1_1_message_buffer.html">MessageBuffer</a> *message)</td></tr>
<tr class="memdesc:a206f88e12844d6650c1611eefbec2fe3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives an entire message.  <a href="#a206f88e12844d6650c1611eefbec2fe3">More...</a><br /></td></tr>
<tr class="separator:a206f88e12844d6650c1611eefbec2fe3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe8eaf84d24d64ce7515c6d9fe6c5085"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#afe8eaf84d24d64ce7515c6d9fe6c5085">send</a> (<a class="el" href="classerpc_1_1_message_buffer.html">MessageBuffer</a> *message)</td></tr>
<tr class="memdesc:afe8eaf84d24d64ce7515c6d9fe6c5085"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to send prepared message.  <a href="#afe8eaf84d24d64ce7515c6d9fe6c5085">More...</a><br /></td></tr>
<tr class="separator:afe8eaf84d24d64ce7515c6d9fe6c5085"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad67bbd6aa37a610abdeb0280da260729"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#ad67bbd6aa37a610abdeb0280da260729">setCrc16</a> (<a class="el" href="classerpc_1_1_crc16.html">Crc16</a> *crcImpl)</td></tr>
<tr class="memdesc:ad67bbd6aa37a610abdeb0280da260729"><td class="mdescLeft">&#160;</td><td class="mdescRight">This functions sets the CRC-16 implementation.  <a href="#ad67bbd6aa37a610abdeb0280da260729">More...</a><br /></td></tr>
<tr class="separator:ad67bbd6aa37a610abdeb0280da260729"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classerpc_1_1_transport"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classerpc_1_1_transport')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classerpc_1_1_transport.html">erpc::Transport</a></td></tr>
<tr class="memitem:af0b6b9c50d238f99de90ccd8b6050c91 inherit pub_methods_classerpc_1_1_transport"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0b6b9c50d238f99de90ccd8b6050c91"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_transport.html#af0b6b9c50d238f99de90ccd8b6050c91">Transport</a> (void)</td></tr>
<tr class="memdesc:af0b6b9c50d238f99de90ccd8b6050c91 inherit pub_methods_classerpc_1_1_transport"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:af0b6b9c50d238f99de90ccd8b6050c91 inherit pub_methods_classerpc_1_1_transport"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cb1c4441873bce62f2ef455a6136888 inherit pub_methods_classerpc_1_1_transport"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0cb1c4441873bce62f2ef455a6136888"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_transport.html#a0cb1c4441873bce62f2ef455a6136888">~Transport</a> (void)</td></tr>
<tr class="memdesc:a0cb1c4441873bce62f2ef455a6136888 inherit pub_methods_classerpc_1_1_transport"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classerpc_1_1_transport.html" title="Abstract interface for transport layer. ">Transport</a> destructor. <br /></td></tr>
<tr class="separator:a0cb1c4441873bce62f2ef455a6136888 inherit pub_methods_classerpc_1_1_transport"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea4a3b77e476397c2f665e7c9449839a inherit pub_methods_classerpc_1_1_transport"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_transport.html#aea4a3b77e476397c2f665e7c9449839a">hasMessage</a> (void)</td></tr>
<tr class="memdesc:aea4a3b77e476397c2f665e7c9449839a inherit pub_methods_classerpc_1_1_transport"><td class="mdescLeft">&#160;</td><td class="mdescRight">Poll for an incoming message.  <a href="#aea4a3b77e476397c2f665e7c9449839a">More...</a><br /></td></tr>
<tr class="separator:aea4a3b77e476397c2f665e7c9449839a inherit pub_methods_classerpc_1_1_transport"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:af5bc7721ee65e9c8230d43a87c47d925"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#af5bc7721ee65e9c8230d43a87c47d925">underlyingSend</a> (const uint8_t *data, uint32_t size)=0</td></tr>
<tr class="memdesc:af5bc7721ee65e9c8230d43a87c47d925"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subclasses must implement this function to send data.  <a href="#af5bc7721ee65e9c8230d43a87c47d925">More...</a><br /></td></tr>
<tr class="separator:af5bc7721ee65e9c8230d43a87c47d925"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad1844c654b1f0dd09f275fafc1b7a7e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#aad1844c654b1f0dd09f275fafc1b7a7e">underlyingReceive</a> (uint8_t *data, uint32_t size)=0</td></tr>
<tr class="memdesc:aad1844c654b1f0dd09f275fafc1b7a7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subclasses must implement this function to receive data.  <a href="#aad1844c654b1f0dd09f275fafc1b7a7e">More...</a><br /></td></tr>
<tr class="separator:aad1844c654b1f0dd09f275fafc1b7a7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ae29f9f3e6b7c8f41a0825ca25cb08d50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classerpc_1_1_crc16.html">Crc16</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#ae29f9f3e6b7c8f41a0825ca25cb08d50">m_crcImpl</a></td></tr>
<tr class="separator:ae29f9f3e6b7c8f41a0825ca25cb08d50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dfd9730202307529a072ad1bc86a49a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8dfd9730202307529a072ad1bc86a49a"></a>
<a class="el" href="classerpc_1_1_mutex.html">Mutex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#a8dfd9730202307529a072ad1bc86a49a">m_sendLock</a></td></tr>
<tr class="memdesc:a8dfd9730202307529a072ad1bc86a49a"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classerpc_1_1_mutex.html" title="Mutex. ">Mutex</a> protecting send. <br /></td></tr>
<tr class="separator:a8dfd9730202307529a072ad1bc86a49a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd338c7149151c832c2932156dc100ca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd338c7149151c832c2932156dc100ca"></a>
<a class="el" href="classerpc_1_1_mutex.html">Mutex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_framed_transport.html#acd338c7149151c832c2932156dc100ca">m_receiveLock</a></td></tr>
<tr class="memdesc:acd338c7149151c832c2932156dc100ca"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classerpc_1_1_mutex.html" title="Mutex. ">Mutex</a> protecting receive. <br /></td></tr>
<tr class="separator:acd338c7149151c832c2932156dc100ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for framed transport layers. </p>
<p>This class adds simple framing to the data transmitted and received on the communications channel. This allows the transport to perform reads and writes of a size known in advance. Subclasses must implement the <a class="el" href="classerpc_1_1_framed_transport.html#af5bc7721ee65e9c8230d43a87c47d925" title="Subclasses must implement this function to send data. ">underlyingSend()</a> and <a class="el" href="classerpc_1_1_framed_transport.html#aad1844c654b1f0dd09f275fafc1b7a7e" title="Subclasses must implement this function to receive data. ">underlyingReceive()</a> methods to actually transmit and receive data.</p>
<p>Frames have a maximum size of 64kB, as a 16-bit frame size is used.</p>
<dl class="section note"><dt>Note</dt><dd>This implementation currently assumes both sides of the communications channel are the same endianness.</dd></dl>
<p>The frame header includes a CRC-16 over the data for integrity checking. This class includes a default CRC-16 implementation that is optimized for code size, but is relatively slow. If a faster implementation is desired, you can pass the new CRC function to setCRCFunction(). </p>
</div><hr/><h2 class="groupheader">Class Documentation</h2>
<a name="structerpc_1_1_framed_transport_1_1_header" id="structerpc_1_1_framed_transport_1_1_header"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct erpc::FramedTransport::Header</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>Contents of the header that prefixes each message. </p>
</div><table class="fieldtable">
<tr><th colspan="3">Class Members</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a2d1167a8481639bb57198ee8e4470749"></a>uint16_t</td>
<td class="fieldname">
m_messageSize</td>
<td class="fielddoc">
Size in bytes of the message, excluding the header. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aea0866f65f3441d290076833c9cdae19"></a>uint16_t</td>
<td class="fieldname">
m_crc</td>
<td class="fielddoc">
CRC-16 over the message data. </td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a206f88e12844d6650c1611eefbec2fe3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> FramedTransport::receive </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classerpc_1_1_message_buffer.html">MessageBuffer</a> *&#160;</td>
          <td class="paramname"><em>message</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Receives an entire message. </p>
<p>The frame header and message data are received. The CRC-16 in the frame header is compared with the computed CRC. If the received CRC is invalid, <a class="el" href="group__infra.html#ggacf5d3df9e7a78f29bc823b71f1529752a7374ea87a0dbfbeaf30d4cf48ac0bc14" title="Generic failure. ">kErpcStatus_Fail</a> will be returned.</p>
<p>The <em>message</em> is only filled with the message data, not the frame header.</p>
<p>This function is blocking.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>Message buffer, to which will be stored incoming message.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kErpcStatus_Success</td><td>When receiving was successful. </td></tr>
    <tr><td class="paramname">kErpcStatus_CrcCheckFailed</td><td>When receiving failed. </td></tr>
    <tr><td class="paramname">other</td><td>Subclass may return other errors from the <a class="el" href="classerpc_1_1_framed_transport.html#aad1844c654b1f0dd09f275fafc1b7a7e" title="Subclasses must implement this function to receive data. ">underlyingReceive()</a> method. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classerpc_1_1_transport.html#a3f886733620e1a2fe00d12f36711dde5">erpc::Transport</a>.</p>

</div>
</div>
<a class="anchor" id="afe8eaf84d24d64ce7515c6d9fe6c5085"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> FramedTransport::send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classerpc_1_1_message_buffer.html">MessageBuffer</a> *&#160;</td>
          <td class="paramname"><em>message</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Function to send prepared message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>Pass message buffer to send.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kErpcStatus_Success</td><td>When sending was successful. </td></tr>
    <tr><td class="paramname">other</td><td>Subclass may return other errors from the <a class="el" href="classerpc_1_1_framed_transport.html#af5bc7721ee65e9c8230d43a87c47d925" title="Subclasses must implement this function to send data. ">underlyingSend()</a> method. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classerpc_1_1_transport.html#a4ede71b16625cba746818294148f9aba">erpc::Transport</a>.</p>

</div>
</div>
<a class="anchor" id="ad67bbd6aa37a610abdeb0280da260729"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void FramedTransport::setCrc16 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classerpc_1_1_crc16.html">Crc16</a> *&#160;</td>
          <td class="paramname"><em>crcImpl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This functions sets the CRC-16 implementation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">crcImpl</td><td>Object containing crc-16 compute function. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="classerpc_1_1_transport.html#a077e72c8afa8caa483220faf45df62c6">erpc::Transport</a>.</p>

</div>
</div>
<a class="anchor" id="af5bc7721ee65e9c8230d43a87c47d925"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> erpc::FramedTransport::underlyingSend </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Subclasses must implement this function to send data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Buffer to send. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of data to send.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kErpcStatus_Success</td><td>When data was written successfully. </td></tr>
    <tr><td class="paramname">kErpcStatus_Fail</td><td>When writing data ends with error. </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classerpc_1_1_t_c_p_transport.html#a3775372dfa7de5fe614c02d635cac05a">erpc::TCPTransport</a>.</p>

</div>
</div>
<a class="anchor" id="aad1844c654b1f0dd09f275fafc1b7a7e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> erpc::FramedTransport::underlyingReceive </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Subclasses must implement this function to receive data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>Preallocated buffer for receiving data. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of data to read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kErpcStatus_Success</td><td>When data was read successfully. </td></tr>
    <tr><td class="paramname">kErpcStatus_Fail</td><td>When reading data ends with error. </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classerpc_1_1_t_c_p_transport.html#ad8d68b7622a84df194ed952c4bfbd2a4">erpc::TCPTransport</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ae29f9f3e6b7c8f41a0825ca25cb08d50"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classerpc_1_1_crc16.html">Crc16</a>* erpc::FramedTransport::m_crcImpl</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>CRC object. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="erpc__framed__transport_8h_source.html">erpc_framed_transport.h</a></li>
<li>erpc_framed_transport.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
